/*
 * @Description: 
 * @Version: 1.0
 * @Author: Ausen
 * @Date: 2023-03-16 10:08:59
 * @LastEditors: Ausen
 * @LastEditTime: 2025-01-12 21:06:51
 */
/**************************** (C) COPYRIGHT 2015 Fortiortech shenzhen *****************************
* File Name          : KeyScan.h
* Author             : Billy Long Fortiortech  Market Dept
* Version            : V1.0
* Date               : 01/07/2015
* Description        : This file contains all the common data types used for Motor Control.
***************************************************************************************************
* All Rights Reserved
**************************************************************************************************/ 

/* Define to prevent recursive inclusion --------------------------------------------------------*/
#ifndef __KEYSCAN_H_
#define __KEYSCAN_H_

// #define SW3				GP17   //冷风按键 冷风

#define SW1             GP33   //按键SW1  控制温度

// #define SW2             GP13   //按键SW2  控制转速


/* Exported types -------------------------------------------------------------------------------*/
typedef struct
{
	uint8 Key1Value;
	uint8 Key2Value;
	uint8 Key3Value;
	
	uint16 Key1PressCnt;
	uint16 Key2PressCnt;
	uint16 Key3PressCnt;
	uint16 Key3releaseCnt;
	
	uint16 KeyADCValue;                     //按键ADC值
	
	uint8 KeyValuetotal;
	uint8 KeyValuetotalInit;
	uint8 OldKeyValuetotal;
	uint8 ChangeKeyFlg;

	uint16 Key_Bus1;
	
} KeyScanParam_TypeDef;


/* Exported variables ---------------------------------------------------------------------------*/
extern KeyScanParam_TypeDef xdata KS;


/* Exported functions ---------------------------------------------------------------------------*/
extern void KeyInit(void);
extern int  KeyValue(void);
extern void KeyScan(void);
extern void AD_KeyScan(void); // 开关挡位扫描
#endif

